package com.example.learn.service.impl;


import com.example.learn.mapper.KnowMapper;
import com.example.learn.pojo.FrontKnow;
import com.example.learn.service.KnowldService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class KnowldServiceImpl implements KnowldService {

    @Autowired
    KnowMapper knowMapper;


    @Override
    public List<FrontKnow> getKnowleDgeList() {
        return knowMapper.getKnowList();
    }

    @Override
    public FrontKnow getKnowById(String id) {
        return knowMapper.getKnowById(id);
    }

    @Override
    public int addKnowledge(FrontKnow know) {
        return knowMapper.addKnowledge(know);
    }

    @Override
    public int updateKnowledge(FrontKnow know) {
        return knowMapper.updateKnowledge(know);
    }

    @Override
    public int delKnowById(String id) {
        return knowMapper.delKnowById(id);
    }
}
